﻿@model WuKeSong.Areas.Music.Models.Music

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Music</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Author)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Author)
            @Html.ValidationMessageFor(model => model.Author)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Genre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Genre)
            @Html.ValidationMessageFor(model => model.Genre)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Comment)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Comment)
            @Html.ValidationMessageFor(model => model.Comment)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SheetMusic)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SheetMusic)
            @Html.ValidationMessageFor(model => model.SheetMusic)
        </div>

        <div>
            上传乐谱:<input type="file" name="file" style="border-style:solid; border-width:thin"/>
        </div>

        <div class="editor-label">
            Genres
        </div>
        <div class="editor-field">            
            @Html.ListBox("Genres",ViewBag.GenreList as MultiSelectList, new { @style = "height:300px;width:200px"})
        </div>
    </fieldset>
    <p>
        <input type="submit" name="SaveMusic" value="Save" />
    </p>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
